﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LongGi.TingkatKebocoranModule.CommModel
{
    /// <summary>
    /// 文档表名称分类
    /// </summary>
    public class ExcelFileHeaderModel
    {
        /// <summary>
        /// 时间  工艺  
        /// </summary>
        /// <param name="path"></param>
        /// <param name="dt"></param>
        public ExcelFileHeaderModel(string fuupath, string path, DataTable dt)
        {
            var s = path.Split(".")[0].Split("_");

            this.TubeName = s[0];
            this.RunNumber = s[1];
            this.TechnologyName = s[2];

            var ss = s[s.Length - 1].Split(" ");
            var hor = ss[1].Substring(0, 2);
            var min = ss[1].Substring(ss[1].Length - 2, 2);
            var datetimestr = ss[0] + " " + hor + ":" + min + ":" + "00";
            this.Time = DateTime.Parse(datetimestr);
            this.FullPath = fuupath;
            DT = new DataTable();
            this.DT = dt;

        }
        /// <summary>
        /// 炉管号
        /// </summary>
        public string TubeName { get; set; }

        /// <summary>
        /// 工艺Run次数
        /// /// </summary>
        public string RunNumber { get; set; }
        /// <summary>
        /// 工艺名称
        /// </summary>
        public string TechnologyName { get; set; }
        public DateTime Time { get; set; }

        /// <summary>
        /// datatable
        /// </summary>
        public DataTable DT { get; set; }
        /// <summary>
        /// 从打他tab中获得的值 目的是为了方面日后获取数据
        /// </summary>
        public float Value { get; set; }


        public string FullPath { get; set; }
    }
}
